package com.encryption.feature.doc.ui.render
{
	import com.encryption.controls.LinkLabel;
	import com.encryption.rpc.model.File;
	
	import flash.events.MouseEvent;
	
	public class OperationLabel extends LinkLabel
	{
		protected var target:Object;
		
		public function OperationLabel()
		{
			super();
		}
		
		protected function get field():String
		{
			return "";
		}
		
		public function initLabel(value:Object):void
		{
			target = value;
			
			if(target == null)
				return;
			
			var show:Boolean = target[field];
			visible = show;
			includeInLayout = show;
			
			if(show)
				addEventListener(MouseEvent.CLICK, mouseClickHandle);
		}
		
		protected function mouseClickHandle(event:MouseEvent):void
		{
		}
		
	}
}